package com.liuwa.sys.service.impl;

import com.liuwa.common.core.service.impl.CurdServiceImpl;
import com.liuwa.sys.dao.OauthDao;
import com.liuwa.sys.domain.Oauth;
import com.liuwa.sys.service.OauthService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 第三方授权Service业务层处理
 * 
 * @author liuwa
 * @date 2021-11-02
 */
@Service
public class OauthServiceImpl extends CurdServiceImpl<Long, OauthDao, Oauth> implements OauthService {

    @Resource
    private OauthDao oauthDao;

    @Override
    public Oauth findByOpenId(String platform, String openId) {
        return oauthDao.findByOpenId(platform, openId);
    }

    @Override
    public Oauth findByUserId(String platform, Long userId) {
        return oauthDao.findByUserId(platform, userId);
    }
}
